Week 2 of 8

Conditionals, Loops & Lists

The three ideas that make code actually powerful — watch them all today

Day 6 60–90 minutes Watch

Day 6 of 40 — Week 2 begins

What You'll Accomplish Today

Today Is a Watch Day

This is a longer session — block out 60–90 minutes with Cursor open next to the video. You're watching the second half of Mosh's course, which covers three connected ideas back-to-back.

Programming with Mosh — Python Full Course for Beginners

Watch from the 1-hour mark through to the end

How to Watch

Have Cursor open next to the video. Every time Mosh types something, you type it too. When he writes an if condition, try changing the condition yourself before he moves on. Pause often. Going slower today means you go faster all week.

What Mosh Will Cover

Conditionals — Making Decisions

The most fundamental idea in programming: if something is true, do this. Otherwise, do that.

= vs ==

One of the most common beginner mistakes: = assigns a value. == checks equality. platform = "Kling" stores the value. platform == "Kling" asks a question. You will mix these up. When you do, come back here.

Loops — Doing Things Repeatedly

A for loop runs a block of code once for each item in a list. A while loop runs until a condition stops being true.

Lists — Ordered Collections

A list holds multiple items in one variable. This is the data structure you'll use more than any other.

Key Concept to Internalize

Everything Has a Truth Value

Python evaluates conditions as True or False. But almost everything in Python has a truth value — you can use any value in an if statement, not just booleans.

These count as False: empty string "", zero 0, empty list [], and None.

Everything else — non-empty strings, non-zero numbers, lists with items — counts as True.

This sounds abstract now. Tomorrow you'll test it in Jupyter and it'll click. For now, just know it exists.

While You Watch — Key Patterns to Notice

These patterns appear constantly in real Python. Watch for them today so they start feeling familiar:

Pattern What it does
if x == "value": Check if a variable holds a specific value
for item in list: Loop through every item in a list
for i in range(5): Loop exactly 5 times (i = 0, 1, 2, 3, 4)
while True: ... break Run forever until you explicitly break out
list.append(item) Add an item to the end of a list
if item in list: Check if an item exists in a list

End of Day Checklist

It's Okay If You Don't Have It All Yet

Today was exposure, not mastery. You saw a lot of new syntax in one session. Tomorrow you'll slow down, experiment in Jupyter one concept at a time, and the pieces will start connecting. The goal of today was to see the whole picture. Tomorrow you zoom in.